﻿using Newtonsoft.Json;
using OSSUtility;
using OSSUtility.BLL;
using Ozone.Help;
using Ozone.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ozone.BLL
{
    public class ChartParamBLL
    {
        static public S10SetupPanelParam get()
        {
            string FDataID = "ChartParam";
            ConfigParamBLL bll = new ConfigParamBLL();
            string FContent = bll.getContent(FDataID);

            S10SetupPanelParam model;

            if (string.IsNullOrEmpty(FContent))
            {
                model = new S10SetupPanelParam();
            }
            else
            {
                model = JsonConvert.DeserializeObject<S10SetupPanelParam>(FContent);

            }
            return model;


        }

        static public void save(S10SetupPanelParam param)
        {
            try
            {
                string FDataID = "ChartParam";
                ConfigParamBLL bll = new ConfigParamBLL();

                bll.Save(FDataID, JsonConvert.SerializeObject(param));


            }
            catch (Exception ex)
            {

            }
        }
    }
}
